package com.ctn.util.http.converter.json;

import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;

import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;

public class CustomJacksonConvert extends MappingJackson2HttpMessageConverter {
	public CustomJacksonConvert() {
		ObjectMapper mapper = new ObjectMapper();
		mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,
				false);  
		mapper.setSerializationInclusion(Include.NON_NULL);
		super.setObjectMapper(mapper);
	}
}
